


if ((typeof(sivfix_show_item_fullpost) == 'undefined') && (typeof(show_item_fullpost) != 'undefined')) 
{

	// Gotten from http://www.quirksmode.org/js/findpos.html
	function findPos(obj) {
	    var curleft = curtop = 0;
	    if (obj && obj.offsetParent) {
		    do {
		         curleft += obj.offsetLeft;
		         curtop += obj.offsetTop;
		     } while (obj = obj.offsetParent);
	    }
	    return [curleft,curtop];
	}



	// override standard show_item_fullpost with one that supports this script
	sivfix_show_item_fullpost = show_item_fullpost;

	// redefine function 				
	show_item_fullpost = function(root_id, article_id, fullpost_element) 
	{
		// call original function
		sivfix_show_item_fullpost(root_id, article_id, fullpost_element);
		
		var pos = findPos(fullpost_element); 
		 		
			
		
		
		
		
		
		
		
		// alert('window.pageYOffset: ' + window.pageYOffset + ' >? offsetTop: ' + fullpost_element.offsetTop); 
	
		if ((window.pageYOffset < fullpost_element.offsetTop ) && (window.pageYOffset + window.innerHeight > fullpost_element.offsetTop))   
		{
			window.scrollTo(window.pageXOffset, fullpost_element.offsetTop);
		}
	}
}